"""green URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import url
import green.views.start as startViews
import green.views.one as oneViews
import green.views.two as twoViews
import green.views.three as threeViews
import green.views.four as fourViews
import green.views.five as fiveViews

from django.views.static import serve

from green import settings

urlpatterns = [
    path('admin/', admin.site.urls),

    url(r"^$", startViews.start, name='index'),
    url(r'showIndex/', startViews.showOne, name='showIndex'),
    url(r'showPredict/', startViews.showPredict, name='showPredict'),

    # 1
    url(r'one/', oneViews.one, name='one'),
    url(r'showOne/', oneViews.showOne, name='showOne'),
    # 2
    url(r'two/', twoViews.two, name='two'),
    url(r'showTwo/', twoViews.showTwo, name='showTwo'),
    url(r'showPredict/', twoViews.showTwoPredict, name='twoPredict'),
    # 3
    url(r'three/', threeViews.three, name='three'),
    url(r'showThree/', threeViews.showThree, name='showThree'),
    url(r'initBigJsonForThree/', threeViews.initBigJsonForThree, name='initBigJsonForThree'),
    # 4
    url(r'four', fourViews.four, name='four'),
    url(r'showFour', fourViews.showFour, name='showFour'),
    url(r'initFour', fourViews.initFour, name='initFour'),
    # 5
    url(r'five', fiveViews.five, name='five'),
    url(r'showFive', fiveViews.showFive, name='showFive'),
    url(r'initBigJsonForFiveMorning', fiveViews.initBigJsonForFive, name='initBigJsonForFiveMorning'),

    url(r'^static/(?P<path>.*)$', serve, {'document_root': settings.STATIC_ROOT}, )  # 注册静态文件
]
